3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides a number of general routines for managing cameras of any kind.
You can use the Q3Camera_GetType function to get type of a camera.
TQ3ObjectType Q3Camera_GetType (TQ3CameraObject camera);
The Q3Camera_GetType function returns, as its function result, the type of the camera specified by the camera parameter. The types of camera currently supported by QuickDraw 3D are defined by these constants:
kQ3CameraTypeOrthographic
kQ3CameraTypeViewAngleAspect
kQ3CameraTypeViewPlane
If Q3Camera_GetType cannot determine the type of the specified camera, it returns kQ3ObjectTypeInvalid .
You can use the Q3Camera_GetData function to get the basic data associated with a camera.
TQ3Status Q3Camera_GetData (
TQ3CameraObject camera,
TQ3CameraData *cameraData);
The Q3Camera_GetData function returns, through the cameraData parameter, basic information about the camera specified by the camera parameter. See "Camera Data Structure" for a description of a camera data structure.
You can use the Q3Camera_SetData function to set the basic data associated with a camera.
TQ3Status Q3Camera_SetData (
TQ3CameraObject camera,
const TQ3CameraData *cameraData);
You can use the Q3Camera_GetPlacement function to get the current placement of a camera.
TQ3Status Q3Camera_GetPlacement (
TQ3CameraObject camera,
TQ3CameraPlacement *placement);
You can use the Q3Camera_SetPlacement function to set the placement of a camera.
TQ3Status Q3Camera_SetPlacement (
TQ3CameraObject camera,
const TQ3CameraPlacement *placement);
You can use the Q3Camera_GetRange function to get the current range of a camera.
TQ3Status Q3Camera_GetRange (
TQ3CameraObject camera,
TQ3CameraRange *range);
You can use the Q3Camera_SetRange function to set the range of a camera.
TQ3Status Q3Camera_SetRange (
TQ3CameraObject camera,
const TQ3CameraRange *range);
You can use the Q3Camera_GetViewPort function to get the current view port of a camera.
TQ3Status Q3Camera_GetViewPort (
TQ3CameraObject camera,
TQ3CameraViewPort *viewPort);
You can use the Q3Camera_SetViewPort function to set the view port of a camera.
TQ3Status Q3Camera_SetViewPort (
TQ3CameraObject camera,
const TQ3CameraViewPort *viewPort);
You can use the Q3Camera_GetWorldToView function to get the current world-to-view space transform.
TQ3Status Q3Camera_GetWorldToView (
TQ3CameraObject camera,
TQ3Matrix4x4 *worldToView);
The Q3Camera_GetWorldToView function returns, in the worldToView parameter, a pointer to a 4-by-4 matrix that describes the current world-to-view space transform defined by the camera specified by the camera parameter. The world-to-view space transform is defined only by the placement of the camera; it establishes the camera location as the origin of the view space, with the view vector (that is, the vector from the camera's eye toward the point of interest) placed along the -z axis and the up vector placed along the y axis.
You can use the Q3Camera_GetViewToFrustum function to get the current view-to-frustum transform.
TQ3Status Q3Camera_GetViewToFrustum (
TQ3CameraObject camera,
TQ3Matrix4x4 *viewToFrustum);
You can use the Q3Camera_GetWorldToFrustum function to get the current world-to-frustum transform.
TQ3Status Q3Camera_GetWorldToFrustum (
TQ3CameraObject camera,
TQ3Matrix4x4 *worldToFrustum);
Previous | QD3D Book | Overview | Chapter Contents | Next |